import UserModel from "../model/userModel";
import IUserSerive from "./IUserServie";
import axios from "../model/axios";


class UserServive implements IUserSerive {
    addUser(data:UserModel){
        return  axios({
            method:"post",
            url:"/userinfo",
            data
        })
    }
    delUser(id: number) {//删除方法
        return axios({
            method: "delete",
            url: "/userinfo/" + id,
        })
    }

    queryUser(params: UserModel) {//查询方法
        return axios({
            method: "get",
            url: "/userinfo",
            params
        })
    }


}
let userService = new UserServive();

export default userService;
export const queryUser = userService.queryUser;